home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 699 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.4 KB

  1. From: James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de>
  2. Message-ID: <9603130943.AA22777@lts.sel.alcatel.de>
  3. X-Original-Date: Wed, 13 Mar 96 10:43:22 +0100
  4. Path: in2.uu.net!bounce-back
  5. Date: 13 Mar 96 16:19:35 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. In-Reply-To: bonnardv@pratique.fr's message of 12 Mar 1996 20:23:00 PST
  9. Newsgroups: comp.std.c++
  10. Subject: Re: Some ideas about C++ and a question
  11. References: <v01530500ad6a43009478@[194.98.4.120]>
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMUb1+OEDnX0m9pzZAQEwIAF+JTd5dr1wXXInqZ/9nKJU/MCA7HThGq6s
  14.     5eZyA7CRxnl+LFeUgjZ3lJIMz5AbZ+0m
  15.     =0Dxy
  16.  
  17. In article <v01530500ad6a43009478@[194.98.4.120]> bonnardv@pratique.fr
  18. (Valentin Bonnard) writes:
  19. |> clamage@Eng.Sun.COM (Steve Clamage) wrote:
  20. |> >Valentin Bonnard <bonnardv@pratique.fr> writes:
  21.  
  22. |> >>4) Conversion of Type** to const Type**
  23. |> >>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. |> >
  25. |> >>It's ok, this is an error; but why cannot Type** be converted to
  26. |> >>const Type* const* ?
  27.  
  28. It can.  It was banned in the C standard, and the C++ committee only
  29. changed this rule recently, so it is possible that many compilers
  30. don't implement it yet.  (It was banned by mistake in the C standard;
  31. the wording to forbid Type** -> Type const** was made too tight.)
  32.  
  33. |> >For the same reason: it could cause a violation of constness without
  34. |> >a cast. The draft standard does allow Type** to be converted to
  35. |> >"Type*const*", since that cannot cause any such violation.
  36.  
  37. |> I don't see how you could violate constness _without_ the cast; if you
  38. |> know, please tell me.
  39.  
  40. I think Steve just misread your statement.  (I know I did the first
  41. time through.)  Why you cannot convert Type** to Type const** is
  42. almost a FAQ, and since since that was the title of point 4...
  43.  
  44. --
  45. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  46. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  47. Conseils, itudes et rialisations en logiciel orienti objet --
  48.                 -- A la recherche d'une activiti dans une region francophone
  49. ---
  50. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  51. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  52. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  53. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  54. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  55.